const { reactive } = Vue;

const MEMBER = "MEMBER";
const USER = "USER";

const store = {
  debug: true,

  state: reactive({
    member: SessionStorage.get(MEMBER) || {},
    user: SessionStorage.get(USER) || {},
  }),

  setMember (member) {
    this.state.member = member;
    SessionStorage.set(MEMBER, member);
    console.log("store保存登录会员：", member);
  },

  setUser (user) {
    this.state.user = user;
    SessionStorage.set(USER, user);
    console.log("store保存登录用户：", user);
  },

};
